import greenfoot.*;

public class ContinueButton extends Actor {
    private boolean isVictory;
    private int width,height,bombs;
    public ContinueButton(boolean isVictory,int width,int height,int bombs) {
        this.isVictory = isVictory;
        this.width=width;
        this.height=height;
        this.bombs=bombs;
        setImage(new GreenfootImage(isVictory ? "继续游戏" : "重新开始", 30, Color.BLACK, new Color(0,0,0,0)));
    }

    public void act() {
        if (Greenfoot.mouseClicked(this)) {
            Greenfoot.setWorld(new GameWorld(width, height, bombs));
        }
    }
}
